package com.bethinner.dao;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.bethinner.demo.InputString;
import com.bethinner.demo.Location;
import com.bethinner.demo.TestService;

import com.bethinner.dao.InputStringDao;
import com.bethinner.dao.LocationDao;
import com.bethinner.dao.TestServiceDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig inputStringDaoConfig;
    private final DaoConfig locationDaoConfig;
    private final DaoConfig testServiceDaoConfig;

    private final InputStringDao inputStringDao;
    private final LocationDao locationDao;
    private final TestServiceDao testServiceDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        inputStringDaoConfig = daoConfigMap.get(InputStringDao.class).clone();
        inputStringDaoConfig.initIdentityScope(type);

        locationDaoConfig = daoConfigMap.get(LocationDao.class).clone();
        locationDaoConfig.initIdentityScope(type);

        testServiceDaoConfig = daoConfigMap.get(TestServiceDao.class).clone();
        testServiceDaoConfig.initIdentityScope(type);

        inputStringDao = new InputStringDao(inputStringDaoConfig, this);
        locationDao = new LocationDao(locationDaoConfig, this);
        testServiceDao = new TestServiceDao(testServiceDaoConfig, this);

        registerDao(InputString.class, inputStringDao);
        registerDao(Location.class, locationDao);
        registerDao(TestService.class, testServiceDao);
    }
    
    public void clear() {
        inputStringDaoConfig.getIdentityScope().clear();
        locationDaoConfig.getIdentityScope().clear();
        testServiceDaoConfig.getIdentityScope().clear();
    }

    public InputStringDao getInputStringDao() {
        return inputStringDao;
    }

    public LocationDao getLocationDao() {
        return locationDao;
    }

    public TestServiceDao getTestServiceDao() {
        return testServiceDao;
    }

}
